package com.neusoft.demo6;


import com.neusoft.demo5.Student;

import java.util.Scanner;

public class Test {
    public void m1(int a) {
        System.out.println(a);
    }

    public void m2(int[] array) {
        for (int i = 0; i < array.length; i++) {
            System.out.println(array[i]);
        }
    }

    public void m3(Student student) {
        student.eat();
    }

    public void m4(Scanner input) {
        System.out.println("请输入一个数：");
        int num = input.nextInt();
        System.out.println(num);
    }

    public static void main(String[] args) {
        Test test = new Test(); //创建对象
//        Student student = new Student();
//        test.m3(student);
//        Scanner input = new Scanner(System.in);
//        test.m4(input);
//        int[] array = new int[10];
        int[] array1 = {1,2,3,4,5};
        test.m2(array1);
    }
}
